package baozhuanglei;
//自动拆箱和装箱
public class Test01 {
    //Integer a = new Integer(1000);
    Integer a = 1000;//jdk5.0以后  自动装箱，编译器帮我们改进代码 Integer a = new Integer(1000);

    int b = new Integer(1500);//拆箱  int b = b.intValue()

    public static void main(String[] args){
        Integer m = 1234;
        Integer m1 = 1234;
        System.out.println(m==m1);
        System.out.println(m.equals(m1));//比较对象里的值
        System.out.println("##################");
        Integer n = 123;
        Integer n1 = 123;
        System.out.println(n==n1);//[-128,127]之间的数，仍当做基本数据类型处理
        System.out.println(n.equals(n1));//比较对象里的值
    }
}
